package com.library.service.serviceImpl;

import java.util.List;

import com.library.dto.pojo.PageBean;
import com.library.dto.vo.Books;
import com.library.dto.vo.ReaderBorrow;
import com.library.dto.vo.ReaderOverdue;
import com.library.service.PageService;

public class PageServiceImpl implements PageService {
	public PageBean<Books> page(List<Books> list,int pageNum,int pageSize,int totalRecord){
		//创建pageBean对象
		PageBean<Books> pb = new PageBean<Books>(pageNum, pageSize, totalRecord);
		//拿到每页数据
		pb.setList(list);
		return pb;
	}
	
	public PageBean<ReaderBorrow> readerPage(List<ReaderBorrow> list,int pageNum,int pageSize,int totalRecord){
		//创建pageBean对象
		PageBean<ReaderBorrow> pb = new PageBean<ReaderBorrow>(pageNum, pageSize, totalRecord);
		//拿到每页数据
		pb.setList(list);
		return pb;
	}
	
	public PageBean<ReaderOverdue> overduePage(List<ReaderOverdue> list,int pageNum,int pageSize,int totalRecord){
		//创建pageBean对象
		PageBean<ReaderOverdue> pb = new PageBean<ReaderOverdue>(pageNum, pageSize, totalRecord);
		//拿到每页数据
		pb.setList(list);
		return pb;
	}
}
